Microsoft DirectX 8.1 (C++)

MSEventBinder.Bind

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The Bind method "binds" or associates an event with an application-defined event handler (subroutine). The event handler is called whenevere the event is fired.

Syntax

objMSEventBinder.Bind(
  Event As Object,
  EventName As String,
  EventHandler As String
) As Long

Parameters

  Event

Specifies the object that fires the event.

  EventName

String that specifies name of the event.

  EventHandler

String that specifies the name of the event handler, as implemented by the application.

Error Codes

If the method fails, an error is raised and Err.Number is set to a value other than zero.

Return Values

This method returns a number that uniquely identifies the binding between the event and the event handler. Store this value and pass it to the MSEventBinder.Unbind method to unbind the event from the event handler.

See Also